﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SaaSKit.Taskr
{
    public partial class Task
    {
        public IList<Activity> ActivityHistory { get; set; }

        public bool IsActive
        {
            get { return !CompletedDate.HasValue; }
        }

        partial void OnCreated()
        {
            _Id = Guid.NewGuid();
            _CreatedDate = DateTime.Now;
        }

        partial void OnSummaryChanging(string value)
        {
            if(string.IsNullOrEmpty(value))
            {
                //TODO: return proper fault.
            }
        }
    }
}
